package com.imooc.miaosha.result;

import sun.applet.resources.MsgAppletViewer;

/**
 * Created by ice on 2018/1/15
 *
 * 错误码和错误信息
 */
public class CodeMsg {

    private int code;
    private String msg;

    /**
     * 错误信息放在此处统一维护
     */
    // 通用异常
    public static CodeMsg SUCCESS = new CodeMsg(0, "success");
    public static CodeMsg SERVER_ERROR = new CodeMsg(500100, "服务端异常");
    // 登录模块 5002XX
    // 商品模块 5003XX
    // 订单模块 5004XX
    // 秒杀模块 5005XX

    private CodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
